package Java语言.并行;

import java.io.*;
import java.util.*;

public class Main {
    @Deprecated
    public static void main(String[] args) throws IOException {
        // Create two Thread objects
        //Thread t1 = new Thread(Java语言.并行.Main::print);
        int[] i = {0};
        System.out.println(i[0]);
        //Thread t2 = new Thread(Java语言.并行.Main::print);

        // Start both threads
        //t1.start();
        //t2.start();
        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(3);
        System.out.println(arrayList.get(0));
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("HelloWorld.txt"));
        bufferedWriter.append("hello");
        bufferedWriter.close();
        BufferedReader bufferedReader = new BufferedReader(new StringReader("hello\nhello\0"));
        Scanner scanner = new Scanner(bufferedReader);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            System.out.println(s);
        }


        HashMap<Integer, String> hashMap = new HashMap<>();
        //hashMap.put();
        Stack<Integer> hello = new Stack<>();
        hello.push(1);
        System.out.println(hello.pop());
        HelloWorld[] s = {new HelloWorld(),new HelloWorld()};

        int[] s2 = new int[2];
        Arrays.sort(s);
        for (HelloWorld t : s
        ) {
            System.out.println(t);
        }
        System.out.println(s);
        System.err.println("hello");

    }

    public static void print() {
        for (int i = 1; i <= 500; i++) {
            System.out.println(i);
        }
    }
}